<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="com.glq.book.dao.BookDao" %>
<%@ page import="java.util.List" %><%--
  Created by IntelliJ IDEA.
  User: 26423
  Date: 2021/6/18
  Time: 15:51
  To change this template use File | Settings | File Templates.
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <style>
        span {
            font-family: "楷体";
            font-size: 70px;
            text-align: center;
            color: white;
        }

        body {
            font-family: "楷体";
            margin: 0px;
            padding: 0px;
        }

        div {
            float: left;
            margin-left: 70px;
        }

        /* img{
            position:absolute;
            left:1100px;
            top:30px;

        } */
        .zhi ul li img:hover {
            height: 100px;
            width: 160px;
        }

        #nnn {
            font-size: 25px;
        }

        #shuosuo {
            width: 50px;
            height: 40px;
        }

        a {
            text-decoration: none;
        }

        a:hover {
            color: red;
            text-decoration: none;
        }

        nav {
            font-size: 20px;
            float: initial;
            margin: 0 0 0 0;
            padding: 0 0 0 0;
        }

        nav ul li {
            float: left;
            display: inline;
        }

        nav ul li a {
            float: left;

            padding: 11px 20px;
            font-size: 14px;
            text-align: center;
            text-decoration: none;
            background: url(aaa/11.jpg) center left no-repeat;
            color: #fff;
            outline: none;
        }

        .zhi h1 a {
            color: white;
        }

        .zhi h1 a:hover {
            color: red;
        }

        .top2 {
            float: right;
            margin: -100px 0;
        }

    </style>
</head>
<h1><span>&nbsp&nbsp&nbsp图书管理系统</span></h1>

<%
    BookDao bookDao = new BookDao();
    List<String> list = bookDao.selectType();
    request.getSession().setAttribute("typeList", list);
%>

<%@include file="webdaohanglan.jsp" %>
<div class="top2">
    <c:if test="${userInfo != null}">
        <a href="/user?type=userInfo&username=${userInfo.username}"><img src="${userInfo.touxiang}" height="35px"
                                                                         width="35px"></a>
        <a href="/user?type=userInfo&username=${userInfo.username}">
            <c:if test="${userInfo.trueName != null}">
                ${userInfo.trueName}
            </c:if>
            <c:if test="${userInfo.trueName == null}">
                ${userInfo.username}
            </c:if>

        </a>
    </c:if>
    <c:if test="${userInfo == null}">
        <a href="#"><img src="aaa/geren1.jpg" height="35px" width="35px"></a>
        <a href="login.jsp">还没有登录？点此登录</a>
    </c:if>

</div>
<p>
<h2>&nbsp&nbsp&nbsp&nbsp&nbsp
    <!-- <input id="nnn" type="search" name="shousuo" placeholder="图书搜索"/>
    <button id="shuosuo" type="button" name="queding" onclick="window.location.href='https://www.baidu.com'" >搜索</button> -->
</h2></p>
<br>
<br>
<body>

<body background="aaa/1000.jpg"
      style="background-repeat:no-repeat ;
       background-size:100% 100%;
       background-attachment: fixed;">
</body>
</br>

<c:forEach var="bookType" items="${typeList}">
    <div class="zhi"><h1><a href="/book?type=getTypeBook&typeName=${bookType}">&nbsp${bookType}</a></h1></div>
</c:forEach>

</body>
</html>
